package com.itjob.scott.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import com.itjob.scott.entity.UserEntity;
import com.itjob.scott.service.UserService;



@Controller
public class UserAction {
	
	@Autowired
	private UserService service;
	

	public boolean login(String username,String password){
		
		UserEntity user = new UserEntity();
		user.setUsername(username);
		user.setPassword(password);
		
		if(service.validate(user)){
			return true;
		}else{
			return false;
		}
	}

}
